package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.OrderEntity;
import com.itheima.pojo.OrderModel;
import com.itheima.service.OrderService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Reference
    private OrderService orderService;
    //查询分页内容
    @RequestMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean) {
        return orderService.findPage(queryPageBean);
    }

    @RequestMapping("add")
    public void add(@RequestBody OrderEntity orderEntity,Integer[] setmealIds){

           orderService.add(orderEntity,setmealIds);
    }



}
